package com.wangsai.framework.supersecurity.satoken;

import com.wangsai.framework.supersecurity.core.SuperSecurityManager;
import com.wangsai.framework.supersecurity.core.config.SuperSecurityConfig;
import com.wangsai.framework.supersecurity.core.context.chain.UserContextFilter;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author Mr.Wang
 * @date 2021-08-15 00:04
 */
public class SuperSecurityBeanInject {

    /**
     * 注入配置Bean
     *
     * @param superSecurityConfig 配置对象
     */
    @Autowired(required = false)
    public void setConfig(SuperSecurityConfig superSecurityConfig) {
        SuperSecurityManager.setConfig(superSecurityConfig);
    }


    @Autowired(required = false)
    public void setUserContextFilterChains(List<UserContextFilter> userContextFilters) {
        SuperSecurityManager.setUserContextFilterChains(userContextFilters);
    }
}